package com.ewhome.apartment.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.ewhome.apartment.mvp.contract.CenterContract;
import com.ewhome.apartment.mvp.model.CenterModel;


@Module
public class CenterModule {
    private CenterContract.View view;

    /**
     * 构建CenterModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public CenterModule(CenterContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    CenterContract.View provideCenterView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    CenterContract.Model provideCenterModel(CenterModel model) {
        return model;
    }
}